import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';
import clear from 'rollup-plugin-clear';
// import tsconfigOverride from './types/tsconfig.json';

export default {
  input: './src/index.ts',
  output: [
    { format: 'es', file: 'dist/index.mjs' },
    { format: 'cjs', file: 'dist/index.cjs' },
  ],
  plugins: [
    clear({ targets: ['dist'] }),
    resolve(),
    commonjs(),
    typescript({
      // tsconfigOverride,
      tsconfig: './types/tsconfig.json',
    }),
  ],
};
